package com.woniu.adapter;

import com.woniu.outlet.dao.*;
import com.woniu.outlet.po.*;
import com.woniu.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;


import java.util.List;

@Component
public class PersonBusinessAdapter {

    @Autowired
    private PersoncardMapper personCardMapper;

    @Autowired
    private PersonCardTransferMapper personCardTransferMapper;

    @Autowired
    private PersonCurrentAccountMapper personCurrentAccountMapper;

    @Autowired
    private PersonCurrentTransferMapper personCurrentTransferMapper;

    @Autowired
    private PersonRegularAccountMapper personRegularAccountMapper;

    @Autowired
    private PersonRegularTransferMapper personRegularTransferMapper;

    //查看个人用户的银行卡的信息
    public List<PersonCard> findpersoncard(Integer wokerid,Integer personid){
        List<PersonCard> findpersoncard = personCardMapper.findpersoncard(wokerid, personid);
        return findpersoncard;
    }


    //查看个人大的银行卡交易记录
    public List<PersonCardTransfer> findPersonCardTransfer(String personcardNum){
        List<PersonCardTransfer> personCardTransfer = personCardTransferMapper.findPersonCardTransfer(personcardNum);
        return personCardTransfer;
    }

    //查看个人的活期账户信息
    public List<PersonCurrentAccount> findPersonCurrentAccount(Integer wokerid,Integer personid){
        List<PersonCurrentAccount> personCurrentAccount = personCurrentAccountMapper.findPersonCurrentAccount(wokerid, personid);
        return personCurrentAccount;
    }

    //查看个人的活期账户的交易记录
    public List<PersonCurrentTransfer> findPersonCurrentTransfer(String personcurrentAccount){
        List<PersonCurrentTransfer> personCurrentTransfer = personCurrentTransferMapper.findPersonCurrentTransfer(personcurrentAccount);
        return personCurrentTransfer;
    }

    //查看个人的定期的账户
    public List<PersonRegularAccount> findPersonRegularAccount(Integer wokerid, Integer personid){
        List<PersonRegularAccount> personRegularAccount = personRegularAccountMapper.findPersonRegularAccount(wokerid, personid);
        return personRegularAccount;
    }

    //查看个人定期账户的交易记录
    public List<PersonRegularTransfer> findPersonRegularTransfer(String personregularAccount){
        List<PersonRegularTransfer> personRegularTransfer = personRegularTransferMapper.findPersonRegularTransfer(personregularAccount);
        return personRegularTransfer;
    }


}
